#!/bin/bash
server_name="server_manager"
var="test"
echo $var

for file in $(ls); do
    if echo $file | grep $server_name > /dev/null; then
        var=$file
    fi
done

echo $var

run_cmd="nohup java -Xms64m -Xmx128m -jar $var server_manager.server &"
echo $run_cmd

eval $run_cmd